/**
 * Created by kenny on 16/4/26.
 */
'use strict';

import {createStore, applyMiddleware} from 'redux';
import thunkMiddleware from 'redux-thunk';
import rootReducer from '../reducers/index';

let createStoreWithMiddleware = applyMiddleware(thunkMiddleware)(createStore);

export default function configureStore(initialState) {
    let store = createStoreWithMiddleware(rootReducer, initialState)
    return store;
}